package com.example.inputnumberview;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    private InputNumberView inputNumberView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        inputNumberView = findViewById(R.id.input_number);
        inputNumberView.setNumberChangeListener(new InputNumberView.OnNumberChangeListener() {
            @Override
            public void onNumberChange(int value) {
                Toast.makeText(MainActivity.this, "数值改变为" +value,Toast.LENGTH_SHORT).show();
            }
        });
        //inputNumberView.setmNumber(10);
        //inputNumberView.getmNumber();
    }
}